from django.conf.urls.defaults import *

urlpatterns = patterns('views.main',
    ('^$', 'index'),
    ('^(?P<page>\d+)/$', 'index'),
    ('^p/(?P<post_key>.+)/$', 'show_post'),

    ('^add_comment/$', 'add_comment'),
    ('^atom.xml$', 'atom'),
    ('^sitemap.xml$', 'sitemap'),
    
    (r'^admin/', include('admin.urls')),
    
)

urlpatterns += patterns('', 
    (r'^logout/$', 'common.auth.logout'),
    (r'^rpc/upload_image/$', 'views.rpc.upload_image'),
    (r'^rpc/img/$', 'views.rpc.img'),
)